import Vue from 'vue'
import VueRouter from 'vue-router'
import MainPage from '@/views/mainpage'
import MyMap from '@/views/mymap'
import Dashboard from '@/views/dashboard'
import Login from '@/views/login'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    component: MainPage,
    children: [{
        path: 'dashboard',
        component: Dashboard
    }, {
        path: 'mymap',
        component: MyMap
    }]
}, {
    path: '/login',
    component: Login
}]

const router = new VueRouter({
    routes
})

export default router